package com.dream21th.common.annotation;

import com.dream21th.common.enums.ParamType;
import com.dream21th.common.validator.OwnDefineValidator;
import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

@Documented
@Target({ElementType.PARAMETER, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = OwnDefineValidator.class)
public @interface OwnDefine {
    String message() default "参数校验不过";

    String method() default "invoke";

    String checkClass() default "";

    ParamType paramType() default ParamType.Body;

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}